<?php

namespace app\admin\validate;

use think\Validate;

class Msg extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'yourname' => 'require',
        'youremail' => 'require|email',
        'theme' => 'require',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'yourname.require' => '姓名不能为空',
        'youremail.require' => '邮箱不能为空',
        'youremail.email' => '邮箱格式不正确',
        'theme.require' => '主题不能为空',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['yourname', 'youremail', 'theme'],
        'edit' => ['yourname', 'youremail', 'theme'],
        'api'  => ['yourname', 'youremail', 'theme'],
    ];
    
}
